package com.gary.chainOfResponsibility;

/**
 * 1号处理
 * @author peng_rui
 * @date 2023/9/13
 */
public class FirstHandler implements ChainHandler{
    private ChainHandler nextHandler;

    public void setNextHandler(ChainHandler chainHandler) {
        this.nextHandler = chainHandler;
    }
    @Override
    public void process(ChainContext context) {
        String record = context.getRecord();
        record = record + " first -> ";
        context.setRecord(record);
        nextHandler.process(context);
    }
}
